package com.lanou.pianke.search.web.controller;

import com.lanou.pianke.search.entity.Piece;
import com.lanou.pianke.search.entity.Preply;
import com.lanou.pianke.search.service.PreplyService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RequestMapping("/es/")
@RestController
public class PreplyController {

    @Autowired
    private PreplyService preplyService;

    // 根据文章回复内容查评论
    @GetMapping("findByPreplyContent")
    public List<Preply> findByPreplyContent(String searchContent){
        return preplyService.searchByPreplyContent(searchContent);
    }

}
